package com.sd.repay.task;

import com.sd.repay.transfer.Transfer;
import com.sd.repay.utils.WebUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 同步出款状态定时任务
 *
 * @author 666666
 */
@Component
public class SyncTransferTask {

    @Resource
    private Transfer transfer;

    private Logger log = LoggerFactory.getLogger(SyncTransferTask.class);


    public void executeSyncTransfer() {
        log.info("同步出款明细定时任务开始执行========》");
        try {
            transfer.sysTransferOrder(10, 5);
        } catch (Exception e) {
            log.error("同步出款明细定时任务出现错误:{}", e.getMessage());
        }
        log.info("同步出款明细定时任务执行完成========》");
        WebUtil.removeBlockTaskBySpringId(WebUtil.getClassSimpleName(this.getClass()));
    }
}
